<?php

require_once dirname(__FILE__) . '/../lib/dossierGeneratorConfiguration.class.php';
require_once dirname(__FILE__) . '/../lib/dossierGeneratorHelper.class.php';

/**
 * dossier actions.
 *
 * @package    smp-crm
 * @subpackage dossier
 * @author     Your name here
 * @version    SVN: $Id: actions.class.php 23810 2009-11-12 11:07:44Z Kris.Wallsmith $
 */
class dossierActions extends autoDossierActions {

    public function executeNew(sfWebRequest $request) {

        $dossier = new Dossier();
        if ($request->hasParameter('user_id')) {
            if ($customer = Doctrine::getTable('customer')->find($request->getParameter('user_id'))) {
                $dossier->setCustomer($customer);
            }
        }

        $this->form = $this->configuration->getForm($dossier);
        $this->dossier = $this->form->getObject();
    }
}
